package com.spring.cloud.examples.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.xml.ws.RequestWrapper;

@Controller
@RequestMapping("/kafka")
public class PostMessageController {

    @Autowired
    private KafkaTemplate kafkaTemplate;

    @RequestMapping("/post/message")
    public void postMessage(String message)
    {
        kafkaTemplate.send("test_message",message);
    }

}
